<?php

namespace App\Console;

use App\Console\Commands\ChannelStatistics;
use App\Console\Commands\CreateCustomer;
use App\Console\Commands\CreateProxyUser;
use App\Console\Commands\DataHandle;
use App\Console\Commands\FlowConsumeDetail;
use App\Console\Commands\FlowTotalFull;
use App\Console\Commands\GetProxyUserStatus;
use App\Console\Commands\GetStaticRegions;
use App\Console\Commands\LoginCount;
use App\Console\Commands\StaticProxyExpired;
use Illuminate\Console\Scheduling\Schedule;
use Laravel\Lumen\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
    /**
     * The Artisan commands provided by your application.
     *
     * @var array
     */
    protected $commands = [
        DataHandle::class,
        CreateCustomer::class,
        CreateProxyUser::class ,
        FlowConsumeDetail::class,
        FlowTotalFull::class,
        GetProxyUserStatus::class,
        ChannelStatistics::class,
        GetStaticRegions::class,
        StaticProxyExpired::class,
    ];

    /**
     * Define the application's command schedule.
     *
     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
     * @return void
     */
    protected function schedule(Schedule $schedule)
    {
        $schedule->command('command:createProxyUser')->everyTenMinutes();
        $schedule->command('command:getFlowConsumeDetail')->everyTenMinutes();
        $schedule->command('command:getFlowTotalFull')->everyTenMinutes();
        $schedule->command('command:getProxyUserStatus')->everyTenMinutes();
        $schedule->command('command:channelStatistics')->everyTwoHours();
        $schedule->command('command:getStaticRegions')->daily();
        $schedule->command('command:staticProxyExpired')->everyFiveMinutes();
    }
}
